package nl.weeaboo.sh.danmaku.commands;

import nl.weeaboo.sh.danmaku.ShotModel;
import nl.weeaboo.sh.danmaku.Spell;
import nl.weeaboo.sh.danmaku.SpellBook;
import nl.weeaboo.sh.danmaku.Universe;

public class TWait extends Spell {

	private int waitFrames;
	
	public TWait(int t) {
		waitFrames = t;
	}
	protected TWait(TWait t) {
		super(t);		
		
		waitFrames = t.waitFrames;
	}
	
	public TWait clone() {
		return new TWait(this);
	}
	
	@Override
	public void step(Universe u, SpellBook sb, ShotModel s) {
		waitFrames--;
		if (waitFrames <= 0) {
			finish();
		}
	}
	
}
